package com.wyclabs.cardmaker.constants;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author TylerW
 * @date 06/22/21 5:04 PM
 */
@AllArgsConstructor
@Getter
public enum CardLevel {

    A("白", "1"),
    B("蓝", "2"),
    C("紫", "3"),
    D("橙", "4");
    
    String type;
    String code;

    public static String getCodeByType(String type) {
        for (CardLevel value : CardLevel.values()) {
            if (value.getType().equals(type)) {
                return value.getCode();
            }
        }
        return "";
    }
}
